package com.base.pig.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.base.pig.entity.ScSensorInfo;
import com.base.pig.mapper.ScSensorInfoMapper;
import com.base.pig.service.ScSensorInfoService;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yjh
 * @since 2022-04-19
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ScSensorInfoServiceImpl extends ServiceImpl<ScSensorInfoMapper, ScSensorInfo> implements ScSensorInfoService {

    @NonNull
    ScSensorInfoMapper  scSensorInfoMapper;



    @Override
    public List<Map<String, Object>> queryAllSensorCode() {
        return scSensorInfoMapper.queryAllSensorCode();
    }

    @Override
    public List<Map<String, Object>> querySensorByDeviceType(String devicetype) {
        return scSensorInfoMapper.querySensorByDeviceType(devicetype);

    }

    @Override
    public List<Map<String, Object>> querySensorByDevice(String tableName, String deviceid) {
        return scSensorInfoMapper.querySensorByDevice(tableName,  deviceid);
    }

    @Override
    public List<Map<String, Object>> querySensorByPoint(String tableName, String pointid) {
        return scSensorInfoMapper.querySensorByPoint(tableName,  pointid);
    }
}
